<script type="text/javascript">
$(document).ready(function(){

	$.formValidator.initConfig({
		formid:"mbsendmsg",
		validatorgroup:"mbsendmsg",
		autotip:true
	});

	$("#commentContent").formValidator({
		validatorgroup:"mbsendmsg",
		empty:false,
		tipid:'notetip',
		onshow:"请输入短信内容",
		onfocus:"短信字数请介于10到200之间!",
		oncorrect:"输入正确,正在发送信息.."
	}).inputValidator({
		min:10,
		max:200,
		onerror:"短信字数请介于10到200之间!"
	});


	$("#mbsendbtn").click(function(){
		var pass=$.formValidator.pageIsValid('mbsendmsg');
		if(pass){
			var queryString = $('#mbsendmsg').formSerialize();
			//alert(queryString);
			$.post(APP+"/Member/mbsendmsg_insert", queryString,function(msg){
				if(msg=='0'){ //先保留msg这个值以备以后使用
					showtips('发送站内信息成功!','tips',1);
					removeDialogbox("#mbsendonemsg");
				}else{
					showtips(msg,'tips',2);
				}
			});
		}
	});


});



</script>

<form id="mbsendmsg">
		<div class="clearfix">
       	    <p class="fl" style="margin-bottom: 10px;">
			    用户名：<input type="test" name='receptionname' value="" class="input">
            </p>
			<p class="fl">
				<textarea id="commentContent"  name="message" class="input textarea notice" style="width:400px; height:64px;"></textarea>
			</p>
			<p class="fl">

				<span class="button">
					<span class="first-child">
						<button id="mbsendbtn" type="button" class="strong" style="min-height:5.8em; height:74px;">发送</button>
					</span>
				</span>
			</p>
			<p class="cb">
				<span id="notetip"></span>

			</p>
			<p class="cb">
				<span id="tips"></span>
			</p>
		</div>
</form>